<?php

namespace LowCode\Core;

use Illuminate\Container\Container;
use Illuminate\Database\Capsule\Manager;
use Illuminate\Events\Dispatcher;

class DM extends Manager
{
    protected Manager $Manager;
    protected string $directory = "";

    public function __construct()
    {
        parent::__construct();
        $admin = Admin::factory();
        $config = $admin->getDbConfig();
        $this->addConnection($config);
        $this->setEventDispatcher(new Dispatcher(new Container));
        $this->setAsGlobal();
    }
}
